$(document).ready(function() {
	show5();
	$(".listMenu li a").click(function(){
		removerSeleccion();
		$("#menuItem > div:first-child").text($(this).text());
		$(this).addClass("seleccionado");
	});
	
	$(".efectButtom").on({
		
		mouseenter:function(){
			var ruta = $(this).attr('src');
			var newruta = ruta.replace('.png','_active.png');
			$(this).attr("src",newruta);
		},
		mouseleave:function(){
			var ruta = $(this).attr('src');
			var newruta = ruta.replace('_active.png','.png');
			$(this).attr("src",newruta);
		}
		
	});

});
function activar(obj){
	removerSeleccionItem();
	$(obj).addClass("menuItemSelected");
}
function removerSeleccionItem(){
	$(".menuEstiloLink").each(function(index){
		$(this).removeClass("menuItemSelected");
	});
}
function actualizarPagina(){
	window.location.reload();
}
function removerSeleccion(){
	$(".listMenu li a").each(function(index){
		$(this).removeClass("seleccionado");
	});
}

function show5() {

    var Digital = new Date();
    var hours = Digital.getHours();
    var minutes = Digital.getMinutes();
    var seconds = Digital.getSeconds();
    var dn = "PM";

    if (hours < 12) {
        dn = "AM";
    }
    if (hours > 12) {
        hours = hours - 12;
    }
    if (hours == 0) {
        hours = 12;
    }
    if (minutes <= 9) {
        minutes = "0" + minutes;
    }
    if (seconds <= 9) {
        seconds = "0" + seconds;
    }
    myclock = "<font size='1' face='Arial' >" + formatHour(hours) + ":" + minutes + ":"
            + seconds + " " + dn + "</font>";
    if (document.layers) {
        document.layers.liveclock.document.write(myclock);
        document.layers.liveclock.document.close();
    }
    else if (document.all) {
        liveclock.innerHTML = myclock;
    }
    else if (document.getElementById) {
        document.getElementById("liveclock").innerHTML = myclock;
        setTimeout("show5()", 1000);
    }
}
function formatHour(hor) {
    var a = "";
    if (hor < 10) {
        a = "0" + parseInt(hor);
    } else {
        a = hor;
    }
    return a;
}